#!/bin/bash -ex

function download() {
    curl -o $1 -z $1 $2
}

download "large_pinyin.txt" "https://raw.githubusercontent.com/mozillazg/phrase-pinyin-data/refs/heads/master/large_pinyin.txt"
download "pinyin.txt"       "https://raw.githubusercontent.com/mozillazg/pinyin-data/refs/heads/master/pinyin.txt"
download "STCharacters.txt" "https://raw.githubusercontent.com/BYVoid/OpenCC/refs/heads/master/data/dictionary/STCharacters.txt"
download "STPhrases.txt"    "https://raw.githubusercontent.com/BYVoid/OpenCC/refs/heads/master/data/dictionary/STPhrases.txt"
download "TSCharacters.txt" "https://raw.githubusercontent.com/BYVoid/OpenCC/refs/heads/master/data/dictionary/TSCharacters.txt"
download "TSPhrases.txt"    "https://raw.githubusercontent.com/BYVoid/OpenCC/refs/heads/master/data/dictionary/TSPhrases.txt"
